package com.se.io;


import org.apache.commons.io.output.FileWriterWithEncoding;

import java.io.File;

public class WriteTxtFileApacheComm {
    public static void main(String[] args) throws Exception {
        String filename = "D:/out.txt";

        File file;
        FileWriterWithEncoding fileWriterWithEncoding =
                new FileWriterWithEncoding(new File(filename),    "GBK");

        fileWriterWithEncoding.write("闵其科");
        fileWriterWithEncoding.close();

    }


}
